Helpful Information
 
 
Category: Dynamic Drive scripts help
hvmenu 100% width

How can I make the HVMenu's width be 100% of the page?

The width of the menu is in pixels, so unless you know the width that 100% is, which is dependant upon browser window size and resolution, you can't specify it in pixels. I have tried 100% and it just throws an error, I've also put in 3000 in the hope that it stops at the edge of the window, but it didn't.

One thing I have just tried is replacing the pixel width with document.body.clientWidth (for IE) and that sort of does it, I assume you would need window.innerWidth for NS. You would also have to deduct any offset from the left edge of the page, if any, that you have set up or else it falls off the edge of the righthand side.










privacy (GDPR)